package data;

import java.security.InvalidParameterException;
import java.lang.String;

public class SMSCommand {
	public final static String CMD_CODE_ALARM = "000";
	public final static String CMD_CODE_DEVICE = "001";
	public final static String CMD_CODE_POWER = "002";
	public final static String CMD_CODE_TURN_OFF_ALARM = "003";
	public final static String CMD_CODE_UPDATE = "004";
	public final static String CMD_CODE_TURN_ON = "005";
	public final static String CMD_CODE_TURN_OFF = "006";
	public final static String CMD_RESULT = "103";
	public final static String CMD_CODE_HOME = "104";
	public final static String CMD_TEST = "105";
	public final static String STATE_ON = "ON";
	public final static String STATE_OFF = "OFF";
	
	private String mPhoneNumber;
	private String mSMSContent;
	
	public SMSCommand() {
		
	}
	
	public SMSCommand (String mPhoneNumber, String smsContent) {
		setSMSCommand(mPhoneNumber, smsContent);
		
		
	}
	
	protected void setSMSCommand(String mPhoneNumber, String smsContent) {
		if (smsContent == null || mPhoneNumber == null) {
			throw new InvalidParameterException();
		}
		
		this.mPhoneNumber = mPhoneNumber;
		this.mSMSContent = smsContent;
	}
	
	public String toString() {
		return this.mSMSContent;
	}

	/**
	 * @return the mPhoneNumber
	 */
	public String getPhoneNumber() {
		return mPhoneNumber;
	}

	/**
	 * @return the mMessage
	 */
	public String getContent() {
		return mSMSContent;
	}

	public String toLogString() {
		return this.toString();
	}
}
